﻿/**
 * Peter
 * Created by: Peter Development Team
 *    http://peter.codeplex.com/
 * 
 * GNU General Public License version 2 (GPLv2)
 *    http://peter.codeplex.com/license
 *
 *  This code is provided on an AS IS basis, with no WARRANTIES,
 *  CONDITIONS or GUARANTEES of any kind.
 *  
 **/

using System;

namespace Peter.Common
{
   /// <summary>
   /// The type of quick open result.
   /// </summary>
   [Flags]
   public enum QuickOpenResultType
   {
      /// <summary>
      /// Quick open is completed.
      /// </summary>
      Finished = 0x01,

      /// <summary>
      /// Keeps the quick open list open for more work to be done.
      /// </summary>
      KeepOpen = 0x02,

      /// <summary>
      /// Replaces the text in the quick open text box.
      /// </summary>
      ReplaceText = 0x04,

      /// <summary>
      /// Opens the given item in peter.
      /// </summary>
      OpenInPeter = 0x08
   }

   /// <summary>
   /// Represents a result of opening a quick open item.
   /// </summary>
   public class QuickOpenResults
   {
      /// <summary>
      /// Initializes a new quick open results.
      /// </summary>
      /// <param name="resultType">The type of resutls.</param>
      public QuickOpenResults (QuickOpenResultType resultType)
      {
         this.ResultType = resultType;
      }

      /// <summary>
      /// Gets the result type.
      /// </summary>
      public QuickOpenResultType ResultType { get; private set; }

      /// <summary>
      /// Gets or Sets the text used in the replace text result type.
      /// </summary>
      public string ReplaceText { get; set; }

      /// <summary>
      /// Gets or Sets the file to open with peter.
      /// </summary>
      public string FileToOpen { get; set; }
   }
}
